﻿using System.Xml;
using Basic.WxGatewayModular.Interface;
using WeDonekRpc.ApiGateway.Attr;
using WeDonekRpc.HttpApiGateway;
using WeDonekRpc.HttpApiGateway.Interface;
using WeDonekRpc.HttpApiGateway.Response;

namespace Basic.WxGatewayModular.Api
{
    internal class WxPlatformApi : ApiController
    {
        private readonly IWxPlatformMsgService _Service;

        public WxPlatformApi (IWxPlatformMsgService service)
        {
            this._Service = service;
        }

        [ApiPrower(false)]
        [ApiRouteName("/wx/platform/notice")]
        public IResponse Notice (XmlDocument xml)
        {
            this._Service.SysEvent(xml);
            return new TextResponse("success");
        }
    }
}
